<template>
    <div class="selectionDetails">
        <div class="selectionDetails_box">
            <div class="box_title">{{ title }}</div>
            <div class="box_div">
                <div class="box_div_top" v-if="type === '1'">
                    <b>{{ datas?.outType === 4 ? '借调时间：' : '出库时间：' }}</b>
                    <span>{{ datas?.outTime }}</span>
                </div>
                <div class="box_div_bottom" v-if="type === '1' && datas?.outType === 4">
                    <div class="box_div_bottom_item box_div_bottom_item_oddNumber">
                        <b>出借方：</b>
                        <span>{{ datas?.loanDeptName }}</span>
                    </div>
                    <div class="box_div_bottom_item box_div_bottom_item_evenNumber">
                        <b>借调总数：</b>
                        <span>{{ datas?.outNum || 0 }}</span>
                    </div>
                    <div class="box_div_bottom_item box_div_bottom_item_oddNumber">
                        <b>还品数量：</b>
                        <span>{{ datas?.returnNum || 0 }}</span>
                    </div>
                    <div class="box_div_bottom_item box_div_bottom_item_evenNumber">
                        <b>超期数量：</b>
                        <span>{{ datas?.overdueNum || 0 }}</span>
                    </div>
                    <div class="box_div_bottom_item box_div_bottom_item_oddNumber">
                        <b>不还说明：</b>
                        <span>{{ datas?.noPutStatusCount }}</span>
                    </div>
                </div>
                <div class="box_div_bottom" v-if="type === '1' && datas?.outType !== 4">
                    <div class="box_div_bottom_item box_div_bottom_item_oddNumber">
                        <b>出库人：</b>
                        <span>{{ datas?.outUserName }}</span>
                    </div>
                    <div class="box_div_bottom_item box_div_bottom_item_evenNumber">
                        <b>出库总数：</b>
                        <span>{{ datas?.outNum || 0 }}</span>
                    </div>
                    <div class="box_div_bottom_item box_div_bottom_item_oddNumber">
                        <b>出库种类：</b>
                        <span>{{ datas?.productNum || 0 }}</span>
                    </div>
                    <div class="box_div_bottom_item box_div_bottom_item_evenNumber">
                        <b>还品数量：</b>
                        <span>{{ datas?.returnNum || 0 }}</span>
                    </div>
                    <div class="box_div_bottom_item box_div_bottom_item_oddNumber">
                        <b>不还说明：</b>
                        <span>{{ datas?.noPutStatusCount }}</span>
                    </div>
                    <div class="box_div_bottom_item box_div_bottom_item_evenNumber">
                        <b>超期数量：</b>
                        <span>{{ datas?.overdueNum || 0 }}</span>
                    </div>
                </div>
                <div class="box_div_top" v-if="type === '2'">
                    <b>选品时间：</b>
                    <span>{{ datas?.selectionTime }}</span>
                </div>
                <div v-if="type === '2'">
                    <div class="box_div_top mt20">
                        <b>选品人：</b>
                        <span>{{ datas?.coreName }}</span>
                    </div>
                    <div class="box_div_top mt20">
                        <b>选品总数：</b>
                        <span>{{ datas?.countNum }}</span>
                    </div>
                    <div class="box_div_top mt20">
                        <b>入库数量：</b>
                        <span>{{ datas?.stockNum }}</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { defineProps } from 'vue'
defineProps(['title', 'type', 'datas'])
</script>

<style lang="less" scoped>
.mt20 {
    margin-top: 20px;
}

.selectionDetails {
    width: 100%;
    background: #F6FAFF;
    box-sizing: border-box;
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden;

    .selectionDetails_box {
        width: 100%;
        background: #fff;

        .box_title {
            width: 100%;
            height: 38px;
            line-height: 38px;
            padding: 0 15px;
            font-weight: 500;
            font-size: 14px;
            color: #0094FF;
            background: linear-gradient(270deg, #FFFFFF 0%, #EBF4FF 100%);
            box-sizing: border-box;
        }

        .box_div {
            width: 100%;
            padding: 15px;
            box-sizing: border-box;

            b {
                width: 75px;
                font-weight: 400;
                font-size: 14px;
                color: #1A1B1C;
            }

            span {
                font-weight: 400;
                font-size: 14px;
                color: #8492AD;
            }

            .box_div_top {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: space-between;
            }

            .box_div_bottom {
                width: 100%;
                display: flex;
                flex-wrap: wrap;

                .box_div_bottom_item {
                    width: 50%;
                    display: flex;
                    align-items: center;
                    margin-top: 20px;
                }

                .box_div_bottom_item_oddNumber {}

                .box_div_bottom_item_evenNumber {
                    justify-content: space-between;
                }
            }
        }
    }
}
</style>